home *** CD-ROM | disk | FTP | other *** search
- Path: news.bridge.net!news
- From: David Byrden <100101.2547@compuserve.com>
- Newsgroups: comp.lang.c++
- Subject: Re: assignment operator and inheritance
- Date: 25 Feb 1996 22:32:04 GMT
- Organization: self-employed
- Message-ID: <4gqo14$ci3@news.bridge.net>
- References: <candymanDn9C6L.Lq2@netcom.com>
- NNTP-Posting-Host: ppp-mia1-43.bridge.net
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 1.1N (Windows; I; 16bit)
-
-
- >> What is the syntax to use the base class's assignment operator within
- >> the child class's assignment operator definition?.
-
-
-
- Child& operator=( const Child& rhs )
- {
- Base::operator=( rhs ) ; // Child& converts to Base& of course
-
- member = rhs.member ;
- // etc etc
- return *this ;
- }
-
-
- David
-
-
-
-